package com.ybkj.daijia.api.beatpay.utils;

/**
 * 翼支付环境工厂
 *
 * @author zane
 */
public class BestPayENVFactory {

    // 测试环境
    public static final String BEST_PAY_ENV_TEST_CREATE_ORDER = "createOrderTest";
    public static final String BEST_PAY_ENV_TEST_GET_PUBLICKEY = "getPublicKeyTest";
    public static final String BEST_PAY_ENV_TEST_GET_WEBURL = "getWebUrlTest";


    // 生产环境
    public static final String BEST_PAY_ENV_PRODUCT_CREATE_ORDER = "createOrderProduct";
    public static final String BEST_PAY_ENV_PRODUCT_GET_PUBLICKEY = "getPublicKeyProduct";
    public static final String BEST_PAY_ENV_PRODUCT_GET_WEBURL = "getWebUrlProduct";


    /**
     * 私有构造,该类无法实例化
     */
    private BestPayENVFactory() {

    }

    /**
     * 获取对应环境URL
     *
     * @param env BestPayENVFactory.BEST_PAY_ENV_TEST
     * @return URL
     */
    public static String getENV(String env) {
        if (BEST_PAY_ENV_TEST_CREATE_ORDER.equals(env)) {
            return "";

        } else if (BEST_PAY_ENV_TEST_GET_PUBLICKEY.equals(env)) {
            return "";

        } else if (BEST_PAY_ENV_TEST_GET_WEBURL.equals(env)) {
            return "";

        } else if (BEST_PAY_ENV_PRODUCT_CREATE_ORDER.equals(env)) {
            return "https://webpaywg.bestpay.com.cn/order.action";

        } else if (BEST_PAY_ENV_PRODUCT_GET_PUBLICKEY.equals(env)) {
            return "https://capi.bestpay.com.cn/common/interface";

        } else if (BEST_PAY_ENV_PRODUCT_GET_WEBURL.equals(env)) {
            return "https://capi.bestpay.com.cn/gateway.pay";

        } else {
            return null;
        }
    }
}
